import Cookie from 'js-cookie'
const auth="learn_token";

export const get_token=()=>{
    let token = Cookie.get(auth);
    if (!token) {
        return '';
    }
    return atob(token);
}
export const set_token = (token: string) => {
    Cookie.set(auth, btoa(token));
}

/**
 * 移除token
 */
export const remove_token = () => {
    Cookie.remove(auth);
}